package com.fiewolf.lol.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.fiewolf.lol.entities.User;
import com.fiewolf.lol.mappers.inters.UserMapper;

@Repository
public class UserDao implements IUserDao {

	@Autowired
	private UserMapper uMapper;

	@Override
	public void saveUser(User user) {
		uMapper.saveUser(user);
	}

	@Override
	public boolean isUserExist(User u) {
		Integer res = uMapper.isUserExist(u);
		if (res == null || res == 0)
			return false;
		return true;
	}

}
